package com.isaiah.oa.support;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * Created by haijun on 2017/12/2.
 */
public class DynamicDataSource extends AbstractRoutingDataSource {
    // 获取当前事务要查找的key
    @Override
    public Object determineCurrentLookupKey() {
        return DynamicDataSourceHolder.getDataSouce();
    }
}
